package com.shiroha.account.config.security.keycloak;

import lombok.Getter;

import java.io.Serial;

@Getter
public class KeycloakException extends RuntimeException {
    @Serial
    private static final long serialVersionUID = 1L;

    private final KeycloakErrorCode errorCode;

    public KeycloakException(String message) {
        super(message);
        this.errorCode = null;
    }

    public KeycloakException(String message, Throwable cause) {
        super(message, cause);
        this.errorCode = null;
    }

    public KeycloakException(String message, KeycloakErrorCode errorCode) {
        super(message);
        this.errorCode = errorCode;
    }

    public KeycloakException(String message, Throwable cause, KeycloakErrorCode errorCode) {
        super(message, cause);
        this.errorCode = errorCode;
    }
}
